// x类型number  y类型number  z可填可不填  return类型number
const add = (x: number, y: number, z?: number): number => {
    return x + y
}

add(10, 20)

// 函数类型接口
interface Isum {
    (x: number, y: number, z?: number): number
}

let add2:Isum = add